#ifndef BASE_ARRAY_H
#define BASE_ARRAY_H

#include "base_core.h"


//-----------------------------------------------------------------------------
// Dynamic array
//-----------------------------------------------------------------------------


/**
 * \brief Create a new array.
 * \return An empty array.
 */
void* array_new(int size, int sizePerElem);

/**
 * \brief Free an array.
 * \param array Array to free
 */
void array_delete(void *array);

/**
 * \brief Resize an array.
 * \param array Array
 * \param newSize New size of the array
 * \return The resized array.
 */
void* array_resize(void *array, int newSize);

/**
 * \brief Get size of an array.
 * \param array Array
 * \return The number of elements allocated in the array.
 */
int array_size(void *array);

#endif
